<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>通知管理</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
<link href="/widget/iconfont/iconfont.css" rel="stylesheet" />
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
</head>

<body>
<div class="container-fluid larry-wrapper">
     <div class="row">
         <div class="col-xs-12 col-sm-12 col-md-12">
             <!--头部搜索-->
             <section class="panel panel-padding">
                    <form class="layui-form" method="post">
                        <div class="layui-form">
							<div class="layui-form-item">
								<div class="layui-input-inline" style="width:120px;">
								  <select name="type" id="type">
									<option value="">请选择类型</option>
									<option value="send">我发送的通知</option>
									<option value="accept">我收到的通知</option>
								  </select>
								</div>
								<div class="layui-input-inline">
                                  <input type="button" lay-submit class="layui-btn" lay-filter="search" id="btn_search" value="查找"/>
                                </div>
							 </div>    
                        </div>
                    </form>
            </section>

            <!--列表-->
                <section class="panel panel-padding">
                    <div class="group-button">
                        <button class="layui-btn layui-btn-small modal-iframe" id="btn_add">
                            <i class="iconfont">&#xe649;</i> 发送通知
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-danger ajax-all" id="btn_del" data-type='{type}'>
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-warm ajax-all" id="btn_ref">
                            <i class="iconfont">&#xe62e;</i> 刷新
                        </button>
                    </div>
                    <div class="layui-form">
                        <table class="layui-table lay-even tbfix">
                            <thead>
                                <tr>
                                    <th width="50"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check" lay-skin="primary"></th>
                                    <th width="60">序号</th>
									<th width="80">发送人</th>
                                    <th style="text-align:center;">内容</a></th>
                                    <script>
                                        if('{type}'=='send'){
                                            document.write('<th width="60" style="text-align:center;">系统成功</th><th width="60" style="text-align:center;">系统失败</th><th width="60" style="text-align:center;">短信成功</th><th width="60" style="text-align:center;">短信失败</th><th width="60" style="text-align:center;">总数</th><th width="120" style="text-align:center;">提醒方式</th>')
                                        }
                                    </script>
									<th width="170" style="text-align:center;">发送时间</th>
                                    <th width="150" style="text-align:center;">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                               {str_html}
                            </tbody>
                        </table>
                    </div>
                </section>
				<div class="text-right" id="page" style="margin-top:-25px;">
					  <ul class="pagination pull-right">
                       {page}
					  </ul>
                </div>
         </div>
     </div>
</div>
<div id="tc" style="display:none;padding:10px;width:300px;height:200px;">
   {jsmodel}
   <script type="text/javascript">
        layui.use('notice_sys');
        $().ready(function(){
            $('td').each(function(){
                var td = $(this).html();
                td = td.replace(/^\s+/,"");
                $(this).html(td);
                if($(this).html()==''){
                    $(this).html('-');
                    $(this).css('text-align','center');
                }
            })
            var type = '{type}';
            $('#type').val(type);
            $("#btn_search").bind("click",function(){   
                var type=$("#type").val();
                location.href="?t=notice_sys&type="+type;
            }); 
        });
		
    </script>
</body>
</html>
